import java.util.ArrayList;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-09
 * Time:13:18
 */
public class main1 {
    public static void main(String[] args) {
        ArrayList<Integer> list=new ArrayList<Integer>();
        list.add(2);
        int i=list.get(0);
        System.out.println(i);
        //字符串转换相应的数
        String s="2";
        int x=Integer.parseInt(s);
        double y=Double.parseDouble(s);
        System.out.println(y);
        //数字转换为字符串
        double ww=42.3;
        String kk=Double.toString(ww);
        System.out.println(ww);
    }
}
